<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>定位absolute</title>
</head>
<body>
    <div class="f">
        <div class="s">
            绝对定位1
        </div>
        <div class="s ss">
            绝对定位2
        </div>
       
    </div>
</body>
<style>
    .f{
        width: 200px;
        height: 300px;
        border: 1px dashed red;
        position: relative;
    }
    .s{
        position: absolute;
        /* left: 10px;
        top: 20%;
        right: 1em;
        bottom: 3em; */
        background-color: pink;
        z-index:-1;

    }
    .ss{
        z-index:-10;
    }

</style>
</html>